package com.jzl.canal_consumer.config;


import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;


/**
 * @author zwwang
 */
@Configuration
@Data
//@PropertySource(value = "classpath:/custom.properties", encoding = "utf-8")
public class CustomConfig
{
    @Value("${rocketmq.nameServers}")
    private String nameServers;
    /**
     * 解析方式 默认0  序列化  1为json (FlatMessage)
     */
    @Value("${consumer.data.parse.type:0}")
    private int parseType;
    @Value("${client.username:canal}")
    private String username;
    @Value("${client.password:0}")
    private String passWord;
    @Value("${consumer.max_count:50}")
    private int consumerMaxCount;
    @Value("${cloud.ops.url}")
    private String opsUrl;
    @Value("${consumer.group_suffixes}")
    private String groupSuffixes;
    @Value("${consumer.topic_suffixes}")
    private String topicSuffixes;
    @Value("${ops_data_source.macs}")
    private String opsDataSourceMacs;
    @Value("${ops_data_source.schemas}")
    private String opsDataSourceSchemas;
    @Value("${mac_remote:false}")
    private boolean macRemote;
    private int retryTimes = 3;
}
